package com.fancy.learncenter.ui.activity;

import android.graphics.Color;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.fancy.learncenter.R;
import com.fancy.learncenter.ui.activity.base.BaseActivity;
import com.fancy.learncenter.ui.adapter.ActivityActPartyAdapter;

import java.util.ArrayList;
import java.util.List;

import butterknife.Bind;
import butterknife.ButterKnife;

public class ActPartyActivity extends BaseActivity {

    @Bind(R.id.recyclerView)
    RecyclerView recyclerView;

    ActivityActPartyAdapter listAdapter;
    List<String> listDatas;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_act_party, Status.STATUS);
        initToolbar("活动派", Color.parseColor("#FFFFFF"));
        ButterKnife.bind(this);

        initRecycleView();
    }

    private void initRecycleView() {
        LinearLayoutManager manager = new LinearLayoutManager(this);
        manager.setOrientation(LinearLayoutManager.VERTICAL);
        recyclerView.setLayoutManager(manager);

        listDatas = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            listDatas.add("" + i);
        }
        listAdapter = new ActivityActPartyAdapter(this, listDatas);
        recyclerView.setAdapter(listAdapter);
    }
}
